package com.sojson.constant;

/**
 * Servlet静态属性类
 * 
 * @author liu
 * @date 2020-11-02
 */
public class ConstantServlet {

    /** ----------------------------以下是静态属性---------------------------- */
    /** ----------------------------以下是静态属性---------------------------- */
    /** ----------------------------以下是静态属性---------------------------- */

    public static final String PACKAGE_DEFAULT_BASE = "com.sojson";
    public static final String PACKAGE_DEFAULT_CONTROLLER = "controller";
    public static final String PACKAGE_DEFAULT_CONTROLLER_ALL = PACKAGE_DEFAULT_BASE + "." + "controller";
    public static final String PACKAGE_DEFAULT_SERVICE = "service";
    public static final String PACKAGE_DEFAULT_SERVICE_ALL = PACKAGE_DEFAULT_BASE + "." + "service";
    public static final String PACKAGE_DEFAULT_ANNOTATION = "annotation";
    public static final String PACKAGE_DEFAULT_ANNOTATION_ALL = PACKAGE_DEFAULT_BASE + "." + "annotation";
    /** 参数名,内容类型 */
    public static final String PARAM_NAME_CONTENT_TYPE = "Content-Type";
    /** Json格式的内容类型 */
    public static final String CONTENT_TYPE_APPLICATION_JSON = "application/json";
    /** HTML文本的内容类型 */
    public static final String CONTENT_TYPE_TEXT_HTML = "text/html";
    /** HTML文本+UTF-8格式的内容类型 */
    public static final String CONTENT_TYPE_TEXT_HTML_UTF_8 = CONTENT_TYPE_TEXT_HTML + ";" + "charset=UTF-8";
    /** 文件的内容类型 */
    public static final String CONTENT_TYPE_MULTIPART_FORM_DATA = "multipart/form-data";
    /** 统一的文本格式 */
    public static final String CONTENT_TYPE = CONTENT_TYPE_APPLICATION_JSON;
    /** 请求方式,get请求 */
    public static final String HTTP_METHOD_GET = "get";
    /** 请求方式,post请求 */
    public static final String HTTP_METHOD_POST = "post";
    /** 请求方式,put请求 */
    public static final String HTTP_METHOD_PUT = "put";
    /** 请求方式,delete请求 */
    public static final String HTTP_METHOD_DELETE = "delete";
    /** 参数名,响应头白名单(浏览器默认不让获取私有响应头,前端要获取哪些响应头,就把哪些响应头的名字放这里) */
    public static final String PARAM_NAME_ACCESS_CONTROL_EXPOSE_HEADERS = "Access-Control-Expose-Headers";
    /** Tomcat抛异常后之前访问的路径在attribute中的参数名 */
    public static final String ERR_PATH_ATTRIBUTE_PARAM_NAME = "javax.servlet.forward.servlet_path";
    /** Tomcat抛异常后异常对象在attribute中的参数名 */
    public static final String ERR_ATTRIBUTE_PARAM_NAME = "javax.servlet.error.exception";

}